﻿App.Views.Index = Backbone.View.extend({

    el: "#content",

    initialize: function () {
        this.wordsViewModel = this.options.collection;
        this.render();
    },

    render: function () {

        $("#content div").remove();

        var pureJson = this.wordsViewModel.toJSON();

        var forTemplating = pureJson[0].Words;

        $("#wordListItemTemplate")
			.tmpl(forTemplating)
			.appendTo("#content");

    }
});